package test23;
import java.util.*;
public class Tast3 {
public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入金钱:");
        int salary = sc.nextInt();
        double tax = 0;
        if(salary>3000){
            if(salary>=3000&&salary<=4500){
                tax=(salary-3000)*0.05;
            }else if(salary>=4500&&salary<=9000){
                tax=1500*0.05+(salary-4500)*0.1;
            }else if(salary>=9000&&salary<=35000){
                tax=1500*0.05+4500*0.1+(salary-9000)*0.2;
            }else if(salary>=35000&&salary<=55000){
                tax=1500*0.05+4500*0.1+26000*0.2+(salary-35000)*0.25;
            }else if(salary>=55000&&salary<=80000){
                tax=1500*0.05+4500*0.1+26000*0.2+20000*0.25+(salary-55000)*0.3;
            }else if(salary>=135000&&salary<=160000){
                tax=1500*0.05+4500*0.1+26000*0.2+20000*0.25+25000*0.3+(salary-135000)*0.35;
            }else{
                tax=1500*0.05+4500*0.1+26000*0.2+20000*0.25+25000*0.3+25000.035+(salary-160000)*0.45;
            }
        }else{
            System.out.println("不用交税");
        }
        System.out.println(tax);
}
}
